import request from "@/utils/request";

export function login(params) {
  return request({
    url: "/login",
    method: "post",
    data: params,
  });
}

export function register(params) {
  return request({
    url: "/register",
    method: "post",
    data: params,
  });
}

export function logout(params) {
  return request({
    url: "/logout",
    method: "post",
    params
  });
}

export function getInfo(params) {
  return request({
    url: "/info",
    method: "get",
  });
}

export function getRouters() {
  return request({
    url: "/routers",
    method: "get",
  });
}

export function captcha() {
  return request({
    url: "/captcha",
    method: "get",
  });
}